home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / INDRANET.CMD < prev    next >
Encoding:
Text File  |  1996-02-15  |  1.7 KB  |  88 lines

  1. # Indra's Net. Trumpet Winsock login script Version 2.0
  2. # Spike 9/1/95
  3.  
  4. # Uncomment the next line if you want to watch the script run.
  5. #trace on
  6.  
  7. # If you need to send an initialization string to your modem, fill it in
  8. # below.  Leave off the "AT", for example: $modemsetup = "&F"
  9. $modemsetup = ""
  10.  
  11. # Don't change these (unless you really, really, want to).
  12.  
  13. $prompt = "net%"
  14. $loginprompt = "ogin:"
  15. $passprompt = "assword:"
  16.  
  17. if %ppp
  18.   $tia = "tia -ppp"
  19. else
  20.   $tia = "tia -slip"
  21. end
  22.  
  23. # Find the stored account name and password, or prompt for them.
  24.  
  25. if ![load $username]
  26.   if [username "Enter your account name"]
  27.     save $username
  28.   end
  29. end
  30. if ![load $password]
  31.   if [password "Enter your password"]
  32.     save $password
  33.   end
  34. end
  35.  
  36. if ![load $number]
  37.   $number = "786-7405"
  38.   save $number
  39. end
  40.  
  41. # Number of attempts to get connected.
  42. %attempts = 10
  43.  
  44. # initialize modem
  45.  
  46. output "atz"\r
  47. if ! [input 10 OK\n]
  48.   display "Modem is not responding"\n
  49.   abort
  50. end
  51.  
  52. # Sent initialization, or just "AT".
  53. output "at"$modemsetup\r
  54. input 10 OK\n
  55.  
  56. # Dial up to the number of attempts defined above.
  57. %n = 0
  58. repeat
  59.   if %n = %attempts
  60.     display "Too many dial attempts"\n
  61.     abort
  62.   end
  63.   output "atdt"$number\r
  64.   %ok = [input 60 CONNECT]
  65.   %n = %n + 1
  66. until %ok
  67. input 10 \n
  68.  
  69. # Wait a little bit to make sure we are connected.
  70. wait 30 dcd
  71.  
  72. # Hit enter to make sure we get a prompt
  73. output \n
  74.  
  75. # Look for the "login:" prompt and send account name.
  76. input 30 $loginprompt
  77. output $username\n
  78.  
  79. # Now "password:"
  80. input 30 $passprompt
  81. output $password\n
  82.  
  83. # We are in, look for the "net%" prompt and then start TIA
  84.  
  85. input 30 $prompt
  86. output $tia\n
  87. display \n
  88. display "Connected to Indra's Net.\n"